function getWebSocket(){
    var webSocket = new WebSocket("ws:/10.108.30.132:8080/socketConnect");

    webSocket.onopen = function (ev) {
        console.log("连接建立");
    }

    webSocket.onmessage = function (ev) {
        console.log("收到消息:");
        var data = JSON.parse(ev.data);
        console.log(data);
        // newData(data.d1,data.d2);

        var groupName = data.groupName;
        var serverName = data.serverName;
        var time = data.time;
        var data = data.data;
        console.log("groupName:"+groupName+",serverName:"+serverName+",time:"+time+",data:"+data);

        receiveData(groupName,serverName,time,data);
    }

    webSocket.onerror = function (ev) {
        console.log("webSocket异常");
    }

    webSocket.onclose = function(ev){
        console.log("连接关闭");
    }

    return webSocket;
}

var webSocket = getWebSocket();